

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <meta name="layout" content="main" />
        <title>Edit Donation</title>
    </head>
    <body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span>
            <span class="menuButton"><g:link class="list" action="list">Donation List</g:link></span>
            <span class="menuButton"><g:link class="create" action="create">New Donation</g:link></span>
        </div>
        <div class="body">
            <h1>Edit Donation</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
            <g:hasErrors bean="${donation}">
            <div class="errors">
                <g:renderErrors bean="${donation}" as="list" />
            </div>
            </g:hasErrors>
            <g:form method="post" >
                <input type="hidden" name="id" value="${donation?.id}" />
                <div class="dialog">
                    <table>
                        <tbody>
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="amountGross">Amount Gross:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:donation,field:'amountGross','errors')}">
                                    <input type="text" id="amountGross" name="amountGross" value="${fieldValue(bean:donation,field:'amountGross')}" />
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="dateCreated">Date Created:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:donation,field:'dateCreated','errors')}">
                                    <g:datePicker name="dateCreated" value="${donation?.dateCreated}" ></g:datePicker>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="donorEmail">Donor Email:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:donation,field:'donorEmail','errors')}">
                                    <input type="text" id="donorEmail" name="donorEmail" value="${fieldValue(bean:donation,field:'donorEmail')}"/>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="donorFirstName">Donor First Name:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:donation,field:'donorFirstName','errors')}">
                                    <input type="text" id="donorFirstName" name="donorFirstName" value="${fieldValue(bean:donation,field:'donorFirstName')}"/>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="donorLastName">Donor Last Name:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:donation,field:'donorLastName','errors')}">
                                    <input type="text" id="donorLastName" name="donorLastName" value="${fieldValue(bean:donation,field:'donorLastName')}"/>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="email">Email:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:donation,field:'email','errors')}">
                                    <input type="text" id="email" name="email" value="${fieldValue(bean:donation,field:'email')}"/>
                                </td>
                            </tr> 
                                                
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="makeAnonymous">Make Anonymous:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:donation,field:'makeAnonymous','errors')}">
                                    <g:checkBox name="makeAnonymous" value="${donation?.makeAnonymous}" ></g:checkBox>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="transactionCode">Transaction Code:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:donation,field:'transactionCode','errors')}">
                                    <input type="text" id="transactionCode" name="transactionCode" value="${fieldValue(bean:donation,field:'transactionCode')}"/>
                                </td>
                            </tr> 
                        
                            <tr class="prop">
                                <td valign="top" class="name">
                                    <label for="transactionFee">Transaction Fee:</label>
                                </td>
                                <td valign="top" class="value ${hasErrors(bean:donation,field:'transactionFee','errors')}">
                                    <input type="text" id="transactionFee" name="transactionFee" value="${fieldValue(bean:donation,field:'transactionFee')}" />
                                </td>
                            </tr> 
                        
                        </tbody>
                    </table>
                </div>
                <div class="buttons">
                    <span class="button"><g:actionSubmit class="save" value="Update" /></span>
                    <span class="button"><g:actionSubmit class="delete" onclick="return confirm('Are you sure?');" value="Delete" /></span>
                </div>
            </g:form>
        </div>
    </body>
</html>
